import service from '../request'


const controller = "OrderInfo"

function Query(data: any): any {
    return service({
        method: 'Get',
        url: controller,
        params: data
    })
}
function del(data: any): any {
    return service({
        method: 'Delete',
        url: controller,
        params: data
    })
}
function add(data:any):any{
    return service({
        method:"post",
        url:controller,
        data
    })
}

function send(typeCode:number,orderId:number):any{
    return service({
        method:"post",
        url:controller+'/send',
        params:{typeCode,orderId}
    })
}

function myOrder(data:any):any{
    return service({
        method: 'Get',
        url: controller+"/getMy",
        params: data
    });
}

function myApproval(data:any):any{
    return service({
        method:'get',
        url:controller+"/getApproval",
        params:data
    });
}

function approval(data:any):any{
    return service({
        method:'post',
        url:controller+'/approval',
        data
    });
}

export default{
    Query,
    del,
    add,
    send,
    myOrder,
    approval,
    myApproval
}